<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">
        <div class="tong_business1 layui-hide">
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">项目名称</div>
                    <div class="con" id="tong_name"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目状态</div>
                    <div class="con" id="tong_state_name"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目属性</div>
                    <div class="con" id="tong_business_name"></div>
                </div>
                <div class="tuo">
                    <div class="tit">建设单位</div>
                    <div class="con" id="tong_jian_unit"></div>
                </div>
                <div class="tuo">
                    <div class="tit">工程造价(万元)</div>
                    <div class="con" id="tong_expectfee"></div>
                </div>
                <div class="tuo">
                    <div class="tit">实际开工日期</div>
                    <div class="con" id="tong_actualdt"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目负责人</div>
                    <div class="con" id="tong_man_xiang_name"></div>
                </div>
            </div>
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">施工合同 A (元)</div>
                    <div class="con colorlan" id="tong_shimoney"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计审定产值 B (元)</div>
                    <div class="con colorlan" id="tong_lei_chan"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计开票(元)</div>
                    <div class="con colorlan" id="tong_lei_piaokai"></div>
                </div>
                <div class="tuo">
                    <div class="tit">销项税(元)</div>
                    <div class="con colorlan" id="tong_kai_ratefee"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计回款 C (元)</div>
                    <div class="con colorlan" id="tong_lei_huikuan"></div>
                </div>
                <div class="tuo">
                    <div class="tit">合同回款比例 C/A (%)</div>
                    <div class="con" id="tong_lei_huirate"></div>
                </div>
                <div class="tuo">
                    <div class="tit">产值回款比例 B/A (%)</div>
                    <div class="con" id="tong_lei_chanrate"></div>
                </div>
            </div>
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">采购合同总额(元)</div>
                    <div class="con colorlan" id="tong_lei_caihe"></div>
                </div>
                <div class="tuo">
                    <div class="tit">供应商累计结算(元)</div>
                    <div class="con colorlan" id="tong_lei_jie"></div>
                </div>
                <div class="tuo">
                    <div class="tit">供应商累计付款 D (元)</div>
                    <div class="con colorlan" id="tong_lei_payment_engin"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目费用报销 E (元)</div>
                    <div class="con colorlan" id="tong_lei_payment_bao"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计收票(元)</div>
                    <div class="con colorlan" id="tong_lei_piaoshou"></div>
                </div>
                <div class="tuo">
                    <div class="tit">进项税(元)</div>
                    <div class="con colorlan" id="tong_lei_shou_jin"></div>
                </div>
                <div class="tuo">
                    <div class="tit">收付差 C-D-E (元)</div>
                    <div class="con" id="tong_lei_shoufucha"></div>
                </div>
            </div>
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">累计成本(元)</div>
                    <div class="con" id="tong_lei_cheng_he"></div>
                </div>
                <div class="tuo">
                    <div class="tit">材料费成本(元)</div>
                    <div class="con colorlan" id="tong_cai_fuku"></div>
                </div>
                <div class="tuo">
                    <div class="tit">人工费成本(元)</div>
                    <div class="con colorlan" id="tong_ren_fuku"></div>
                </div>
                <div class="tuo">
                    <div class="tit">机械费成本(元)</div>
                    <div class="con colorlan" id="tong_zu_fuku"></div>
                </div>
                <div class="tuo">
                    <div class="tit">分包费成本(元)</div>
                    <div class="con colorlan" id="tong_fen_fuku"></div>
                </div>
                <div class="tuo">
                    <div class="tit">措施费成本(元)</div>
                    <div class="con colorlan" id="tong_cuo_fuku"></div>
                </div>
                <div class="tuo">
                    <div class="tit">间接费成本(元)</div>
                    <div class="con colorlan" id="tong_jian_payment_bao"></div>
                </div>
            </div>
        </div>
        <div class="tong_business2 layui-hide">
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">项目名称</div>
                    <div class="con" id="tong2_name"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目状态</div>
                    <div class="con" id="tong2_state_name"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目属性</div>
                    <div class="con" id="tong2_business_name"></div>
                </div>
                <div class="tuo">
                    <div class="tit">建设单位</div>
                    <div class="con" id="tong2_jian_unit"></div>
                </div>
                <div class="tuo">
                    <div class="tit">工程造价(万元)</div>
                    <div class="con" id="tong2_expectfee"></div>
                </div>
                <div class="tuo">
                    <div class="tit">实际开工日期</div>
                    <div class="con" id="tong2_actualdt"></div>
                </div>
                <div class="tuo">
                    <div class="tit">联营方</div>
                    <div class="con" id="tong2_lian_unit"></div>
                </div>
            </div>
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">施工合同 A (元)</div>
                    <div class="con colorlan" id="tong2_shimoney"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计审定产值 B (元)</div>
                    <div class="con colorlan" id="tong2_lei_chan"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计开票(元)</div>
                    <div class="con colorlan" id="tong2_lei_piaokai"></div>
                </div>
                <div class="tuo">
                    <div class="tit">销项税(元)</div>
                    <div class="con colorlan" id="tong2_kai_ratefee"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目收款 A (元)</div>
                    <div class="con colorlan" id="tong2_lei_incomeengin"></div>
                </div>
                <div class="tuo">
                    <div class="tit">内包扣款 B (元)</div>
                    <div class="con colorlan" id="tong2_lei_payment_neikou"></div>
                </div>
                <div class="tuo">
                    <div class="tit">内包付款 C (元)</div>
                    <div class="con colorlan" id="tong2_lei_payment_neifu"></div>
                </div>
            </div>
            <div class="tongbox tongbox7">
                <div class="tuo">
                    <div class="tit">采购合同总额(元)</div>
                    <div class="con colorlan" id="tong2_lei_caihe"></div>
                </div>
                <div class="tuo">
                    <div class="tit">供应商累计结算(元)</div>
                    <div class="con colorlan" id="tong2_lei_jie"></div>
                </div>
                <div class="tuo">
                    <div class="tit">供应商累计付款 D (元)</div>
                    <div class="con colorlan" id="tong2_lei_payment_engin"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目费用报销 E (元)</div>
                    <div class="con colorlan" id="tong2_lei_payment_bao"></div>
                </div>
                <div class="tuo">
                    <div class="tit">累计收票(元)</div>
                    <div class="con colorlan" id="tong2_lei_piaoshou"></div>
                </div>
                <div class="tuo">
                    <div class="tit">进项税(元)</div>
                    <div class="con colorlan" id="tong2_lei_shou_jin"></div>
                </div>
                <div class="tuo">
                    <div class="tit">项目余额 A-B-C-D-E (元)</div>
                    <div class="con" id="tong2_lei_balance"></div>
                </div>
            </div>
        </div>

        <div><?php include "../public_flow/flow_show_info.php";?></div>
        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">项目名称</td><td class="tv" id="name"></td><td class="tt">项目编号</td><td class="tv" id="number"></td></tr>

                <tr><td class="tt">项目属性</td><td class="tv" id="business_name"></td><td class="tt">项目类型</td><td class="tv" id="engintype"></td></tr>
                <tr id="lian_unitdiv" class="layui-hide"><td class="tt">联营方</td><td class="tv" id="lian_unit" colspan="3"></td></tr>
                <tr><td class="tt">建设单位</td><td class="tv" id="jian_unit"></td><td class="tt">所属单位</td><td class="tv" id="chanid_name"></td></tr>
                <tr><td class="tt">所在地</td><td class="tv" id="areas"></td><td class="tt">详细地址</td><td class="tv" id="addr"></td></tr>
                <tr><td class="tt">工程造价(万元)</td><td class="tv" id="expectfee"></td><td class="tt">工期(天)</td><td class="tv" id="duration"></td></tr>
                <tr><td class="tt">计划开工日期</td><td class="tv" id="startdt"></td><td class="tt">计划竣工日期</td><td class="tv" id="enddt"></td></tr>
                <tr><td class="tt">招标方式</td><td class="tv" id="zhaotype"></td><td class="tt">项目状态</td><td class="tv" id="state_name"></td></tr>
                <tr><td class="tt">项目负责人</td><td class="tv" id="man_xiang_name" colspan="3"></td></tr>
                <tr id="actualdtDiv" class="layui-hide"><td class="tt">实际开工日期</td><td class="tv" id="actualdt" colspan="3"></td></tr>
                <tr id="filishdtDiv" class="layui-hide"><td class="tt">竣工验收日期</td><td class="tv" id="filishdt" colspan="3"></td></tr>

                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>
        <div><?php include "../public/upinfo_show.php";?></div>
        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>
        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_engin_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;


                if(data.business == 1){
                    $(".tong_business1").removeClass('layui-hide');
                    $("#tong_name").text(data.name);
                    $("#tong_state_name").text(data.state_name);
                    $("#tong_business_name").text(data.business_name);
                    $("#tong_jian_unit").text(data.jian_unit);
                    $("#tong_expectfee").text(parseFormatNum(data.expectfee, 6));
                    $("#tong_actualdt").text(data.actualdt);
                    $("#tong_man_xiang_name").text(data.man_xiang_name);



                    $("#tong_shimoney").text(parseFormatNum(data.shimoney)).click(function () {
                        openPage('../contract_shi/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_chan").text(parseFormatNum(data.lei_chan)).click(function () {
                        openPage('../engin_chan/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_piaokai").text(parseFormatNum(data.lei_piaokai)).click(function () {
                        openPage('../piao_kai/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_kai_ratefee").text(parseFormatNum(data.kai_ratefee)).click(function () {
                        openPage('../piao_kai_hui/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_huikuan").text(parseFormatNum(data.lei_huikuan)).click(function () {
                        openPage('../income_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budname='+encodeURI('工程款'), '80%', '80%');
                    });
                    $("#tong_lei_huirate").text(data.lei_huirate);
                    $("#tong_lei_chanrate").text(data.lei_chanrate);


                    $("#tong_lei_caihe").text(parseFormatNum(data.lei_caihe)).click(function () {
                        openPage('../contract_cai/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_jie").text(parseFormatNum(data.lei_jie)).click(function () {
                        openPage('../tong_pub/gonglei.php?enginid='+data.id, '80%', '80%');
                    });
                    $("#tong_lei_payment_engin").text(parseFormatNum(data.lei_payment_engin)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_payment_bao").text(parseFormatNum(data.lei_payment_bao)).click(function () {
                        openPage('../payment_bao/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_piaoshou").text(parseFormatNum(data.lei_piaoshou)).click(function () {
                        openPage('../piao_shou/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong_lei_shou_jin").text(parseFormatNum(data.lei_shou_jin)).click(function () {
                        openPage('../piao_shou_hui/tong.php?piaotype=1&enginname='+encodeURI(data.name), '80%', '80%');
                    });
                    $("#tong_lei_shoufucha").text(data.lei_shoufucha);


                    $("#tong_lei_cheng_he").text(data.lei_cheng_he);
                    $("#tong_cai_fuku").text(parseFormatNum(data.cai_fuku)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budid=1', '80%', '80%');
                    });
                    $("#tong_ren_fuku").text(parseFormatNum(data.ren_fuku)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budid=2', '80%', '80%');
                    });
                    $("#tong_zu_fuku").text(parseFormatNum(data.zu_fuku)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budid=3', '80%', '80%');
                    });
                    $("#tong_fen_fuku").text(parseFormatNum(data.fen_fuku)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budid=4', '80%', '80%');
                    });
                    $("#tong_cuo_fuku").text(parseFormatNum(data.cuo_fuku)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budid=5', '80%', '80%');
                    });
                    $("#tong_jian_payment_bao").text(parseFormatNum(data.jian_payment_bao)).click(function () {
                        openPage('../payment_bao/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                }else{
                    $(".tong_business2").removeClass('layui-hide');
                    $("#tong2_name").text(data.name);
                    $("#tong2_state_name").text(data.state_name);
                    $("#tong2_business_name").text(data.business_name);
                    $("#tong2_jian_unit").text(data.jian_unit);
                    $("#tong2_expectfee").text(parseFormatNum(data.expectfee, 6));
                    $("#tong2_actualdt").text(data.actualdt);
                    $("#tong2_lian_unit").text(data.lian_unit);



                    $("#tong2_shimoney").text(parseFormatNum(data.shimoney)).click(function () {
                        openPage('../contract_shi/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_chan").text(parseFormatNum(data.lei_chan)).click(function () {
                        openPage('../engin_chan/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_piaokai").text(parseFormatNum(data.lei_piaokai)).click(function () {
                        openPage('../piao_kai/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_kai_ratefee").text(parseFormatNum(data.kai_ratefee)).click(function () {
                        openPage('../piao_kai_hui/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_incomeengin").text(parseFormatNum(data.lei_incomeengin)).click(function () {
                        openPage('../income_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1&budname='+encodeURI('工程款垫资款'), '80%', '80%');
                    });
                    $("#tong2_lei_payment_neikou").text(parseFormatNum(data.lei_payment_neikou)).click(function () {
                        openPage('../payment_neikou/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_payment_neifu").text(parseFormatNum(data.lei_payment_neifu)).click(function () {
                        openPage('../payment_neifu/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });



                    $("#tong2_lei_caihe").text(parseFormatNum(data.lei_caihe)).click(function () {
                        openPage('../contract_cai/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_jie").text(parseFormatNum(data.lei_jie)).click(function () {
                        openPage('../tong_pub/gonglei.php?enginid='+data.id, '80%', '80%');
                    });
                    $("#tong2_lei_payment_engin").text(parseFormatNum(data.lei_payment_engin)).click(function () {
                        openPage('../payment_engin/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_payment_bao").text(parseFormatNum(data.lei_payment_bao)).click(function () {
                        openPage('../payment_bao/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_piaoshou").text(parseFormatNum(data.lei_piaoshou)).click(function () {
                        openPage('../piao_shou/tong.php?enginname='+encodeURI(data.name)+'&status=1', '80%', '80%');
                    });
                    $("#tong2_lei_shou_jin").text(parseFormatNum(data.lei_shou_jin)).click(function () {
                        openPage('../piao_shou_hui/tong.php?piaotype=1&enginname='+encodeURI(data.name), '80%', '80%');
                    });
                    $("#tong2_lei_balance").text(data.lei_balance);
                }











                $("#name").text(data.name);
                $("#number").text(data.number);
                $("#business_name").text(data.business_name);
                if(data.business == 2){
                    $("#lian_unitdiv").removeClass('layui-hide');
                    $("#lian_unit").text(data.lian_unit);
                }
                $("#engintype").text(data.engintype);
                $("#jian_unit").text(data.jian_unit);
                $("#chanid_name").text(data.chanid_name);
                $("#areas").text(data.areas);
                $("#addr").text(data.addr);
                $("#expectfee").text(data.expectfee);
                $("#duration").text(data.duration);
                $("#startdt").text(data.startdt);
                $("#enddt").text(data.enddt);
                $("#man_xiang_name").text(data.man_xiang_name);
                $("#state_name").text(data.state_name);
                $("#zhaotype").text(data.zhaotype);
                $("#actualdt").text(data.actualdt);
                $("#filishdt").text(data.filishdt);
                $("#explain").text(data.explain);

                if(data.state == 3){
                    $("#actualdtDiv").removeClass('layui-hide');
                }
                if(data.state == 6){
                    $("#actualdtDiv").removeClass('layui-hide');
                    $("#filishdtDiv").removeClass('layui-hide');
                }




                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('engin', param_id);
    });



</script>
</body>
</html>




